<?php
/**
 *
 * @author Mike Gao
 */
class EnterViewModel extends ViewModel{
    protected $pk  = 'Enter.id';

    public $viewFields = array(
    	'Enter' => array('id','enter_no','buy_id','warehouse_id','supplier_id'=>'supid','user_id','create_time','update_time','total','status','sum_number'),
        'Enter_detail' => array('id'=>'did','number','supplier_id','enter_price','lot','exp','total'=>'dtotal','create_time'=>'dctime','update_time'=>'dutime','_on' => 'Enter.id = Enter_detail.enter_id'),
        'Supplier' => array('name'=>'sname', '_on' => 'Enter_detail.supplier_id = Supplier.id'),
        'Product' => array('id'=>'pid', 'name', 'tm','unit_id','cat_id','cost_default','minstock','_on' => 'Enter_detail.product_id = Product.id'),
        
    );


}
?>
